<!DOCTYPE html>
<html>

<head>

    {include file="common:meta"}

</head>
<style>
</style>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">

    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">

                <div class="ibox-content">
                    <form method="" class="form-horizontal" id="form" action="">
                        <div class="hr-line-dashed"></div>
                        <div class="form-group has-success">
                            <label class="col-sm-2 control-label">ID</label>
                            <div class="col-sm-10">
                                {$data['u_id']}
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group has-success">
                            <label class="col-sm-2 control-label">昵称
                            </label>
                            <div class="col-sm-10">
                                {$data['nickname']}
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group has-success">
                            <label class="col-sm-2 control-label">钻石</label>
                            <div class="col-sm-10">
                                {$data['diamond']}
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group has-success">
                            <label class="col-sm-2 control-label">金币
                            </label>
                            <div class="col-sm-10">
                                {$data['gold']}
                            </div>
                        </div>

                        <div class="hr-line-dashed"></div>
                        <div class="form-group has-success">
                            <label class="col-sm-2 control-label">操作人</label>
                            <div class="col-sm-10">
                                {$data['operator']}
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group has-success">
                            <label class="col-sm-2 control-label">发起时间
                            </label>
                            <div class="col-sm-10">
                                {$data['ct']}
                            </div>
                        </div>

                        <div class="hr-line-dashed"></div>
                        <div class="form-group has-success">
                            <label class="col-sm-2 control-label">状态</label>
                            <div class="col-sm-10">
                                审核中
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group has-success">
                            <label class="col-sm-2 control-label">赠送原因</label>
                            <div class="col-sm-10">
                                {$data['reason']}
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group has-success">
                            <div class="col-sm-4 col-sm-offset-2">
                                <input class="btn btn-primary" id="btn-submit" type="button" value="操作">
                                <input class="btn btn-primary" id="close-win" type="button" value="关闭">
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
{include file="common:footer"}
<script type="text/javascript">
    var ct = "{$data['ctime']}";
    var pf = parent.layer;
    var objj = parent.$('#tb_departments3');
    $('#close-win').on('click',function () {
        pf.closeAll();
    });
    $('#btn-submit').on('click',function(){

            layer.confirm('确定审核通过此条记录吗？',{
                title:['提示','font-size:18px;font-family:楷体;font-weight:700;'],
                btn: ['通过','不通过','取消'] //按钮
            },function(){
                $.ajax({
                    type:'get',
                    url:"/GivePresenApproveCheck?status=1&ct=" + ct,
                    async:true,
                    dataType:'json',
                    success:function(result){
                        if(result.code == true){

                            layer.msg(result.msg,{
                                icon:1,
                                time:1000
                            });
                            //layer.closeAll();
                            objj.bootstrapTable('refresh');
                            setTimeout(function () {
                                pf.closeAll();// 关闭layer
                            },1200);
                            objj.bootstrapTable('refresh');
                        }
                        else{
                            objj.bootstrapTable('refresh');
                            layer.msg(result.msg,{
                                icon:2,
                                time:1000
                            });

                        }
                    },
                    error:function(err){
                        layer.msg('服务器开小差了！',{
                            time:1500
                        });
                    }
                });
            },function(){

                $.ajax({
                    type:'get',
                    url:"/GivePresenApproveCheck?status=2&ct=" + ct,
                    async:true,
                    dataType:'json',
                    success:function(result){
                        if(result.code == true){
                            layer.msg(result.msg,{
                                icon:1,
                                time:1000
                            });
                            objj.bootstrapTable('refresh');
                            setTimeout(function () {
                                pf.closeAll();// 关闭layer
                            },1200);
                            objj.bootstrapTable('refresh');
                        }
                        else{
                            objj.bootstrapTable('refresh');
                            layer.msg(result.msg,{
                                icon:2,
                                time:1000
                            });
                        }
                    },
                    error:function(err){
                        layer.msg('服务器开小差了！',{
                            time:1500
                        });
                    }
                });
            },function () {
               
            });
    });


</script>

   
</body>

</html>